# curl -s https://gitee.com/codesprite/gist/raw/master/fix_cocos_2.2.1_dock_icon.sh -o fix_cocos_2.2.1_dock_icon.sh && bash fix_cocos_2.2.1_dock_icon.sh && rm fix_cocos_2.2.1_dock_icon.sh
curl -o ~/Desktop/electron.icns https://gitee.com/codesprite/gist/raw/master/cocos.icns
open ~/Desktop
echo "手动将桌面上 electron.icns 替换到 [你的 Cocos Creator 2.2.1 的安装目录]/CocosCreator.app/Contents/Resources/electron.icns 后点击任意键继续"
read tmp
echo "清理 Finder 和 Dock 图标缓存，请输入电脑密码"
sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \;
sudo rm -rf /Library/Caches/com.apple.iconservices.store;
killall Dock
killall Finder